﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ScreenImage
{
    class Program
    {
        static void Main(string[] args)
        {



            Image img = new Bitmap(Screen.AllScreens[0].Bounds.Width, Screen.AllScreens[0].Bounds.Height);
            Graphics g = Graphics.FromImage(img);
            g.CopyFromScreen(new Point(0, 0), new Point(0, 0), Screen.AllScreens[0].Bounds.Size);
            if (args.Length > 0)
            {
                img.Save(args[0] + ".jpg");
            }
            else {
                img.Save( DateTime.Now.ToString("yyyy-MM-dd HH mm ss") + ".jpg");
            }


       

        }
    }
}
